package com.gxa.mobile.service;

import com.gxa.service.GoodsRpcVo;
import com.gxa.core.result.Result;
import com.gxa.mobile.pojo.vo.TCartVo;

import java.util.List;

public interface ShoppingCarService {

    //用token数据来查询购物车(不分页)
    List<GoodsRpcVo> selectAllCart(Integer userId);

    //用token数据来查询购物车(分页)
    List<GoodsRpcVo> selectCart(String userId);

    //删除用户购物车
    boolean deleteUserCart(Integer userId);

    //给购物车删除商品
    boolean deleteCart(Integer userId,Integer goodsId);

    //减少商品数量
    boolean reduceCartItemQuantity(Integer userId, Integer goodsId, Integer quantity);

    //给购物车添加商品
    TCartVo addCarts(Integer userId, Integer goodsId, Integer number);

    //更新加购数量
    boolean updateCart(Integer userId, Integer goodsId, Integer number);

    Result<List<GoodsRpcVo>> buyShoppingAllCart(Integer userId);

    Result<GoodsRpcVo> buyShoppingCart(Integer userId,Integer goodsId);

    boolean addItem(Integer userId, Integer  goodsId, Integer number);
}
